The present invention relates to a method for font access, registration, display and printing and a method for processing an electronic document in which is included a variant font, as well as to a recording medium therefor that facilitates the exchange of and the search for information among a plurality of information systems, and to the use of a variant font in an electronic document system.
For applications for census registration or client management, which involve the management of the names of persons and of areas, or for applications for the electronic documentation of the editions of classical works, there has been a strong demand for processes that will permit the handling of as many characters as possible. According to one method that has been devised in response to this demand, a conventional system, such as a word processor, is used, and the concept of xe2x80x9cnon-standard charactersxe2x80x9d or of xe2x80x9cuser defined charactersxe2x80x9d is introduced, so that in a user""s environment characters unique to the user are prepared or used.
However, this method is used only in a closed environment wherein the non-standard characters or the user defined characters are used in common by a single user or a single company, and in an open environment, such as the Internet, the exchange of information concerning a document using such non-standard characters is not ensured. That is, in an environment wherein a user refers to an electronic document, a character that the writer of the document did not intend to use is displayed.
Further, a large problem has arisen concerning the conduct of a search for a document in which non-standard characters are used. For example, if in a document it is desired that the old Chinese character be used for xe2x80x9ctakaxe2x80x9d in xe2x80x9ctakashima,xe2x80x9d i.e., if it is desired that be used,
is defined as a non-standard character. In this case, the non-standard character can not be found by conducting a search using the regular character for xe2x80x9ctaka,xe2x80x9d i.e., the standard font. To search for both xe2x80x9ctakaxe2x80x9d characters, either a logical OR must be used, or a thesaurus wherein character variant relationships are defined must be created and used for a fuzzy search. However, neither method is practical.
Specifically, in order to perform a search using a logical OR, a user must fully understand what non-standard characters are registered in the user""s information system, and the relationship between those non-standard characters and standard characters. Furthermore, relative to the method involving the use of a thesaurus, since the user-defined characters are defined and used by user by user, characters included in a thesaurus will differ from a user to another, so that a user of a search system can not create a common thesaurus that is adequate for use by all other users.
To resolve the above shortcoming, a method has been devised whereby in a character code table all necessary characters are defined as standard characters, and whereby a thesaurus is created in which variant relationships are specified for the included defined characters. However, several hundred thousand, or an infinite number of characters may be required in order to define character codes so as to identify tiny differences in character styles, and if character codes including such an enormous number of characters were supported as standard character codes by all information systems, the attendant costs of the installations would have to be charged to all the users of the systems. For these reasons, the above described method is not practical. In addition, were a variant style thesaurus to be created for on the order of several hundred thousand Chinese characters, the size of the thesaurus would be too large, and search speeds would be reduced. Further, it would be substantially impossible to maintain such a thesaurus were the entry thereto of additional characters permitted.
The above described problems have arisen because a character coining function is prepared for Chinese character writing system. That is, for handwriting or for a normal edition for which a print character type is used, new character types are formed as needed, and a person may be expected to ignore tiny differences in the type, or kana characters may be entered alongside the newly created Chinese characters, so that the creator and a reader tacitly share in a relationship that exists between a regular character and a variant character. When the coining function of Chinese character writing system and the fuzzy reading function are carried out by an information system, a definition function to be used for non-standard characters is provided for a user, so that the coining function of Chinese character writing system can be implemented. However, the fuzzy reading function is ignored because the processing available with a conventional information system is too poor to adequately perform fuzzy image recognition, and because compared with the information required for the exchange of data when character codes are used, the amount of information required for the exchange of data when images are used is much larger.
As the Internet has become popular, the exchange of electronic information, whether among individuals or among companies, has become common. Before, since information was exchanged using media on which characters were printed, the reading of the characters was the responsibility of a user, and for an information system there was little need for a fuzzy reading function. However, at the present, now that generally electronic data are exchanged, and stored electronic data are searched for, a greater need has arisen for an increase in the standard characters that are specially defined for data exchange, for the exchange of character data for non-standard characters that have been coined, and for searches to be performed for those characters.
It is one object of the present invention to provide a method for font access, a method for font registration, a method for font display and a method for handling an electronic document in which a variant font is included, and a recording medium therefor, so that the creator of an electronic document can use many more characters than those to which restricted by the conventional character codes.
To achieve the above object, according to the present invention, provided is a method for font access that uses a variant font file, which is constituted by: a variant font data file consisting of image data of a variant font; and an index conversion table, which includes a primary index table consisting of character codes of regular characters and pointers for corresponding secondary indexes, a secondary index table including secondary index entry data consisting of a pointer to the first byte of a target font in the variant font data file and a pointer to the succeeding secondary index entry having the same primary index.
The method for using the variant font file is as follows. Based on a character code and a variant character number of a regular character of a target variant font that is indexed in an electronic document, the primary index table in the index conversion table is referred to; a pointer to a corresponding secondary index is obtained from the character code of the regular character; the position of entry data, relative to a secondary index in the secondary index table pointed to by the obtained pointer, is moved a distance equivalent to the variant character number; and a font image at the position pointed to by the pointer relative to the first byte of the target variant font is obtained as the target variant font.
Further, a font registration method according to the present invention comprises the steps of: sequentially adding and registering, in a variant font data file, font data in a variant font file that represents an image of a variant font to be added to a variant font data file selected by a user; regarding, as entry data of a secondary index, positional information of registered font data and the number of fonts having the same primary index number in the font file, and storing the positional information and the number of fonts in a secondary index table for an index conversion table; and storing, in a primary index table, a character code of a regular character defined by a user, and a pointer to a secondary index corresponding to the character code of the regular character.
Furthermore, according to a font display method of the present invention, when the character code of a regular character is entered by a user, first, a font library is searched and a font having the character code is displayed on a display device. At the same time, a variant font, in which is included the character code of the regular character, is obtained from a variant font file, which is constituted by a variant font data file including image data of a variant font, and an index conversion table that includes a primary index table in which are entered character codes of regular characters and pointers of corresponding secondary indexes, and a secondary index table in which is entered a secondary index entry data consisting of a pointer to the first byte of a target font in the variant font data file, and a pointer to the succeeding secondary index entry of data having the same primary index. Thereafter, the variant font is displayed on the display device.
According to a font printing method of the present invention, first, a font having a character code of a regular character is obtained from a font library and is printed. Then, a variant font file is used constituted by: a variant font data file consisting of image data of a variant font; and an index conversion table included in which are a primary index table consisting of character codes of regular characters and pointers to corresponding secondary indexes, and a secondary index table including secondary index entry data consisting of a pointer to the first byte of a target font in the variant font data file and a pointer to the succeeding secondary index entry having the same primary index. Based on a character code and a variant character number of a regular character in a target variant font that is indexed in an electronic document, the primary index table in the index conversion table is referred to. The pointer to the corresponding secondary index is obtained from the character code of the regular character, and the position of the entry data, relative to the secondary index in the secondary index table pointed to by the obtained pointer, is moved a distance equivalent to the variant character number. Then, a font image at the position of the pointer of the first byte of the target variant font is obtained and printed.
In the above described method for font access, method for font registration, method for font display and method for font printing, a method for embedding a variant font in an electronic document, a method for processing an electronic document having a variant font being embedded, and a method for searching for a character string in such an electronic document, are provided as a preferred method for handling an electronic document in which a variant font is included. Furthermore, a recording medium is provided for storing an electronic document in which a variant font used in the present invention and in its preferred implementation is indexed.
According to the above described method for font access, method for font registration, method for font display, method for font printing, and method for handling an electronic document in which is included a variant font, the creator of an electronic document can use many more characters (character styles) than those to which restricted by conventional character codes. Accordingly, the restriction placed on the number of characters that can be used for registration/management or for a client management application that manages the names of persons and areas, or for an application for the electronic documentation of the editions of classical works can be eliminated, and the names of persons and areas and the classes can be processed and stored using correct character styles. Further, information can be exchanged using an electronic document written in characters coined by a user. That is, a character having the same character style as one that is formed in the environment of a writer can be displayed in the environment of a recipient of an electronic document. Furthermore, a search can be conducted of an electronic document that uses a coined character. That is, a character string can be searched for without a regular character and a variant character being separated, or, as needed, a search of a character string can be conducted without a distinction being made between a regular character and a variant character.
As a preferred implementation, a variant font is embedded in an electronic document by using a character code in a local system, a character code as an in line font, or a URL indicating the character code of a font file in a remote system. In this case, when an electronic document processing system is used that satisfies the above requests by using conventional character code, installation costs can be reduced.